import request from '../utils/request';
import Qs from 'qs'
/**
 * Qs.stringify 序列化数据 
 * 
 */
//1.商品列表
export const dbGoodLists = (query) => {
	console.log('数据::', query)
	return request({
		url: '/vuebacker/goodlists.html',
		method: 'get',
		params: query
	})
}

//2.修改商品价格
export const dbChangePrice = (query) => {
	console.log('数据::', query)
	return request({
		url: '/vuebacker/editgoodprice.html',
		method: 'post',
		data: Qs.stringify(query)
	})
}

//3.搜索商品
export const dbSearchGoods = (query) => {
	console.log('数据::', query)
	return request({
		url: '/vuebacker/searchgood.html',
		method: 'post',
		data: Qs.stringify(query)
	})
}

//5.添加商品
export const dbAddGood = (query) => {
	console.log('数据::', query)
	return request({
		url: '/vuebacker/addgood.html',
		method: 'post',
		data: Qs.stringify(query)
	})
}
